﻿using System;

namespace Test30.Engine
{
    public class DiseaseAction : Action
    {
        public DiseaseAction(Entity entity, int damage)
            : base(entity)
        {
            _damage = damage;
        }

        protected override ActionResult OnProcess()
        {
            //### bob: chance to resist based on stamina

            // figure out how much worse to make it
            int disease = Math.Max(1, _damage / 6);

            Entity.Health.AddBonus(BonusType.Disease, -disease);

            return ActionResult.Done;
        }

        private readonly int _damage;
    }
}
